<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%-- 设置菜单选中状态专用 --%> 
<c:set var="servletPath" value="${pageContext.request.servletPath}"/>
<c:set var="currentTab" value=""/>
	<div class="navbar">
		<div class="navbar-inner navbar-fixed-top">
			<div class="container">
				<div class="nav-collapse collapse">
					<ul class="nav">
						<li class="<c:if test="${currentTab == 'welcome' }">active</c:if>">
							<a href="${path }/user/center">首页</a>
						</li>
						<li class="dropdown">
							<a data-toggle="dropdown" class="dropdown-toggle" href="javascript:void(0)">评论查询<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="${path }/user/comment/list">我的评论</a></li>
								<shiro:hasAnyRoles name="admin,publisher"><li><a href="${ctx }/user/comment/listall?audit=0">待审评论</a></li></shiro:hasAnyRoles>
								<shiro:hasAnyRoles name="admin,publisher"><li><a href="${ctx }/user/comment/listall?audit=1">已审评论</a></li></shiro:hasAnyRoles>
								<shiro:hasAnyRoles name="admin,publisher"><li><a href="${ctx }/user/comment/listall?audit=2">拒绝评论</a></li></shiro:hasAnyRoles>
							</ul>
						</li>
						<li class="dropdown <c:if test="${currentTab=='user' || currentTab=='role' || currentTab=='permission' }">active</c:if>">
							<a data-toggle="dropdown" class="dropdown-toggle" href="javascript:void(0)">角色权限<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<shiro:hasRole name="admin"><li><a href="${ctx }/user/user">用户列表</a></li></shiro:hasRole>
								<li><a href="${path }/user/role">角色列表</a></li>
								<li><a href="${path }/user/permission">权限列表</a></li>
							</ul>
						</li>						
						<li>
							<a href="${path }/user/collection/list">我的收藏</a>
						</li>
					</ul>

					<ul class="nav pull-right">
					    <shiro:guest>
					    <div style="display:inline-block;margin-top: 5px;">免注册登陆：<a href="${path}/user/beforeLogin4qq"><img alt="使用qq登陆" title="使用qq登陆" src="${path }/img/qq30.png" width="30" height="30" class="img-circle"/></a>&nbsp;&nbsp;<a href="${path}/user/beforeLogin4Sina"></a></div>
					    </shiro:guest>
						<shiro:user><li><a>欢迎  <strong><shiro:principal/></strong> ！</a></li>
						<li class="divider-vertical"></li>
						<li> <a href="${path }/user/logout">退出</a></li></shiro:user>
					</ul>
				</div>

			</div>
		</div>
	</div>